export default {
	init: function() {
		return new Promise(function(resolve, reject) {
			console.log('12346')
			window.init = function() {
				resolve()
			}
			var script = document.createElement('script')
			script.type = 'text/javascript'
			script.src =
				`https://api.map.baidu.com/api?v=3.0&ak=8f7bbd3aa2b0bb1d6bbe8f9c454de224&callback=init`
			script.onerror = reject
			document.head.appendChild(script)
		});
	}
}
